The synchronous close causes us to block in fsync() which has extremely
poor interactivity implications on ext3.
Also, the 5 second timeout was an accidental commit from debugging, 5
minutes is fine.
https://bugzilla.gnome.org/show_bug.cgi?id=602456
*/
/* How often we save internally app data, in seconds */
-#define SAVE_APPS_TIMEOUT_SECONDS 5 /* leave this low for testing, we can bump later if need be */
+#define SAVE_APPS_TIMEOUT_SECONDS (5 * 60)
/* With this value, an app goes from bottom to top of the
* usage list in 50 hours of use */
out:
if (!error)
- g_output_stream_close (G_OUTPUT_STREAM(data_output), NULL, &error);
+ g_output_stream_close_async (G_OUTPUT_STREAM (data_output), 0, NULL, NULL, NULL);
g_object_unref (data_output);
if (error)
{